﻿
 common_path = "http://" + location.host ;


function mycollect() {
    var str = "<?xml version='1.0'?>";
    str += "<root>";
    str += "<ColumnID>"+columnid +"</ColumnID>";       
    str += "<Title>" + columninfoname + "</Title>";
    str += "<ColumnInfoID>" + columninfoid + "</ColumnInfoID>";
    str += "</root>";
    
    //var xml = new ActiveXObject("Microsoft.XMLDOM");
    //xml.loadXML(str);
   
    var url = common_path + "/common/agent/addMyCollection.jsp?jtime=" + (new Date()).getTime();
    //XmlHttpPool.PostRemoteData(url, addcollectresult, xml.xml);
    XmlHttpPool.PostRemoteData(url, addcollectresult, str);	
}

function addcollectresult(data) {
	
  		
	if (data.indexOf("1")>=0) {
		alert("收藏成功");
	} 
	else {
		if (data.indexOf("2")>=0) {
			alert("您已经收藏了该条信息");
		}
		else
			alert("收藏失败");
	}
}